5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
- Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
+ Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
+ Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 3-15: Using the Image Editor

Data Lookup Option


Data lookups link a field in one file to additional data in a related file by means of a key field in the related file. In other words, they tell APPX how to access another file during process execution. Lookups are defined for items on images in input, output, and inquiry processes. If the key field is a group, the order that the components are painted on the screen is significant. Parts of the key are assembled from left to right, and top to bottom.

You can define the same field(s) and data lookup more than once on a single image. Each time you define the field, you can designate a data lookup. For example, you may have a Product File Maintenance screen that permits entry of three alternate suppliers. Each Supplier ID is used to perform data lookup in the Supplier file.

Values in the lookup file can display on an image automatically. Auto displays tell APPX which of the values from the lookup file should display on an image. For example, if you define a data lookup to a customer file with a customer number key field, you can automatically display such additional fields as the customer name, address, phone, and contact name without having to execute a DISPLAY statement for each field. If a field is not auto displayed, you must define a DISPLAY statement before the field will appear on the image. (For auto display purposes, the order that fields are painted in on an image is also significant if multiple lookups to the same file are defined. The auto displayed fields must be part of the file that is defined in the preceding data lookup definition, determined from left to right, top to bottom.)

Automatic actions can also be specified if the lookup record is not on file. For example, you can specify whether this should be considered an error or a warning condition.

The Define Data Lookup overlay includes two mutually exclusive overlays that are used to define a data lookup. One screen is for the painted item that represents the first part of the key for a lookup from a specific file and a second is for additional items, if any, that comprise the rest of the key.

When you select the Data Lookup option from the Image Item Specifications screen, the overlay shown The Inquiry Record Frames Additional Attributes overlay is shown below appears.

Define Data Lookup Overlay

The initial Define Data Lookup overlay contains one field. This field appears on all other Define Data Lookup overlays, as well.

Data Lookup Type governs whether or not the value of this item is used as a key, or part of a key, to automatically look up a record in another file. If so, this screen is followed by a specification screen that defines the data lookup. The Data Lookup Type options are:

NONE. There is no data lookup associated with this item.

DEFINE. The value of this item establishes the first, or only, portion of the lookup key value.

CONTINUE. The value of this item establishes the second (or other subsequent) portion of the lookup key value. It must be preceded by an item that is created with a value of Define.

The default value is None.

If you enter Define for the Data Lookup Type, the overlay shown The Inquiry Record Frames Additional Attributes overlay is shown below appears.

Define Data Lookup Overlay, Define

If you enter Continue for the Data Lookup Type, the overlay shown The Inquiry Record Frames Additional Attributes overlay is shown below.

Define Data Lookup Overlay, Continue

The Define Data Lookup overlays for Define and Continue contain the following field in common:

Data Lookup File identifies the application and file that is to be read. The following additional fields only display for the Define Data Lookup, Define overlay.

The remaining fields appear on the Define overlay only:

Key Field determines the key field in the Data Lookup File that serves as the keypath for a lookup. This key field is identified by its Field Name.

File Must Exist? indicates whether or not the file that is entered in Data Lookup File above must exist. If 'yes' and the file does not exist, APPX reports an error condition. If 'no' and the file does not exist, the lookup is not performed. The default is 'yes' .

Action if NOF governs APPX's response if the referenced record is not on file (NOF) in the Data Lookup File. The Action if NOF options are:

NONE. Takes no action with regard to the NOF condition.

WARNING. Displays a warning message to the user.

ERROR. Displays an error message to the user.

For output processes, APPX prints warnings and errors to the report file. They do not display on the screen. The default is None.

Exact Key Req'd? determines whether or not a user must enter a key value that exactly matches a value contained in the file defined for the lookup. If 'no' , the user can enter a partial key value, and APPX will search for the first record that matches the partial key entry. The user can also enter a complete key value and, if not on file, APPX will retrieve the record with the next highest key value. The default is 'yes' .

Read Record? governs whether or not the data lookup record is read into the current record area for this file. If 'no' , APPX performs the lookup and auto displays fields in the lookup record. However, the record read does not affect the current record area in memory, and is not available with statements. This is useful, for example, when you want to establish a lookup to the process control file but do not want to modify the current PCF record. The default is 'yes' .

Application Design Manual                                         "Powered by Appx Software"

428

©2006 By APPX Software, Inc. All Rights Reserved